<?php
session_start();
if($_SESSION["memberId"] !=null)
{
	session_unregister("memberId");
	session_destroy();	
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>ログイン画面</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" />
<script language="JavaScript" src="js/common.js" type="text/javascript"></script>
<script>
	function check()
	{
		if(document.getElementById("loginid").value == null 
		|| document.getElementById("loginid").value == ""
		|| document.getElementById("password").value == null
		|| document.getElementById("password").value == "")
		{
			alert("ユーザー名とパスワードが必要です。");
			return false;
		}
		else
		{
			document.getElementById('form1').submit();
		}
	}
	
	function keyDown(e)
	{
		 e=e||event;
		 if(e.keyCode==13)
		{
			check();
		}		
	}	
</script>
</head>
<body bgcolor="#F4FFE4" >
<?php include("head.php");?>
<?php include("Service/WebClass/loginClass.php");
$login = new Login;
$login->mytask();
?>  
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="7" bgcolor="#5C743D"><img src="images/mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
  </tr>

 <tr>
    <td width="170" height="361" valign="top" bgcolor="#5C743D">
		 <br />
  	&nbsp;<br />
  	&nbsp;<br /> 	</td>
    <td width="90"><img src="images/mm_spacer.gif" alt="" width="50" height="1" border="0" /></td>
    <td colspan="2" valign="top"><div align="center"><img src="images/mm_spacer.gif" alt="" width="305" height="1" border="0" /><br />	  
          <span class="navText STYLE2">&nbsp; </span><span class="TITELSTYLE">Login
            </span>
    </div>
      <form id="form1" name="form1" method="post">
 	    <?php
	    echo "<input type=hidden name=act value=submit>"
  	  ?>

      <br />   
        <div align="center">
        
          <?php
    			if($login->errorMessage != null && $login->errorMessage != "")
					echo "<font id=errorMsg name=errorMsg color=red>".$login->errorMessage."</font><br>";
    			?> 
          <table><tr><td>
        
          <span class="subHeader STYLE5">ユーザー名:</span><span class="STYLE5"></span>
          </td><td align="left">
	    <input name="loginid" type="text" id="loginid" size="25" class="textboxlen" onkeydown="keyDown(event)" />
       </td></tr>
<tr><td>
<span class="subHeader STYLE5">パスワード:</span>
</td><td align="left">
              <input name="password" type="password" class="textboxlen" id="password" size="25" onkeydown="keyDown(event)" />
        </td></tr>
<tr><td colspan="2" align="center">       
                <input name="" type="button" onclick="return check()" value="ログイン" class="navText"/>
  </td></tr></table></div>
      </form>
        <br /><br />
	  <div align="right">
        <p align="center"><span class="STYLE4"></span> <span class="smallText">アカウントをお持ちでない場合 </span>
           <input name="" type="button" onclick="window.location = 'member/RegistNew.php'" value="アカウント作成" class="subHeader"/> 
        </p>
      </div>
	  <div align="center"><a href="member/LostPass.php">パスワードを忘れた場合はこちら</a><br />
	    &nbsp;<br /> 
	    <br />
	    &nbsp;<br />	
      </div></td>
    <td width="181">&nbsp;</td>
  </tr>
</table>
<?php include("foot.php");?>
</body>
</html>
